<template>
	<view class="success">
		<view class="s_navBar">
			<nav-bar isBack backColor="#fff" background="transparent" isPlace="false"></nav-bar>
		</view>
		
		<view class="s_contain">
			<view class="u-skeleton">
				<view class="s_top">
					<view class="s_tImg"><image src="https://manager.ryz1620.com/static/enter/icon_success.png"></image></view>
					<view class="s_tTip">恭喜您，审核通过！</view>
					<view class="s_tBg"><image src="https://manager.ryz1620.com/static/enter/bg_5.png"></image></view>
				</view>
				
				<view class="s_cont">
					<view class="s_cTit">电脑端管理后台</view>
					<view class="s_cList">
						<view class="s_cItem">
							<view class="s_cCopy" @click="copyContent(html)">复制</view>
							<view class="s_cLabel">登录地址：</view>
							<view class="s_cVal omit-1">{{html}}</view>
						</view>
						<view class="s_cItem">
							<view class="s_cCopy" @tap="copyContent(acount)">复制</view>
							<view class="s_cLabel">登录账户：</view>
							<view class="s_cVal omit-1">{{acount}}</view>
						</view>
						<view class="s_cItem">
							<view class="s_cCopy" @tap="copyContent(password)">复制</view>
							<view class="s_cLabel">初始密码：</view>
							<view class="s_cVal omit-1">{{password}}</view>
						</view>
					</view>
				</view>
				
				<view class="s_button" @click="openurl"进入后台</view>
			</view>
		</view>
	</view>
</template>

<script>
import navBar from "@/components/navBar/navBar.vue"
import service_enter from '@/service/enter.js'

export default {
	data() {
		return {
			acount: "",
			password: "",
			html:'https://manager.ryz1620.com/static',
			}
	},
	
	components: { navBar },
	
	onLoad(params) {
		this.getAccount()
	},
	
	methods: {
		getAccount() {
			service_enter.getEnterAccount({ })
				.then(res => {
					if (res.code == 1) {
						this.acount = res.data.acount
						this.password = res.data.password
						this.html = res.data.url
					}
					else {
						this.$utils.showErr({ title: res.msg })
					}
				})
				.catch(err =>{
					this.$utils.showErr()
				})
		},
		openurl(){
			uni.reLaunch({
				url: '/pages/mall/newIndex/newIndex',
			});
		},
		copyContent(content) {
			wx.setClipboardData({ data: String(content) })
		}
	}
}
</script>

<style lang="scss" scoped>
.success {width: 100vw;height: 100vh;background: #fff;
	.s_navBar {position: relative;z-index: 500;}
	.s_contain {position: relative;z-index: 400;}
	.s_top {height: 864rpx;background: #364052;position: relative;overflow: hidden;
		.s_tImg {width: 233rpx;height: 233rpx;margin: 314rpx auto 0;}
		.s_tTip {height: 44rpx;line-height: 44rpx;text-align: center;color: #fff;font-size: 32rpx;margin-top: 44rpx;}
		.s_tBg {width: 100%;height: 188rpx;position: absolute;bottom: 0;left: 0;}
	}
	.s_cont {color: #1a1c20;padding-top: 28rpx;
		.s_cTit {height: 44rpx;line-height: 44rpx;text-align: center;font-size: 32rpx;}
		.s_cList {padding-top: 14rpx;}
		.s_cItem {height: 56rpx;color: #cbaf87;font-size: 24rpx;margin: 26rpx 90rpx 0 128rpx;}
		.s_cCopy {width: 120rpx;height: 56rpx;line-height: 56rpx;text-align: center;float: right;}
		.s_cLabel {width: 126rpx;height: 56rpx;line-height: 56rpx;color: #666;float: left;}
		.s_cVal {height: 56rpx;line-height: 56rpx;font-size: 30rpx;padding: 0 14rpx;border-radius: 8rpx;background: #f9f6f3;overflow: hidden;}
	}
	.s_button {width: 478rpx;height: 84rpx;color: #364052;margin: 72rpx auto 36rpx;border: 1px solid #364052;border-radius: 44rpx;display: flex;justify-content: center;align-items: center;}
} 
</style>